#pragma once
#include "TStr.h"
#include "Quaternion.h"
namespace  Apo
{
	class StringConverter
	{
	public:
		// utf8 Str to mltibyte character Str (mbcs)
		static void utf2mbc( const char * utf, Str & mbc );

		static void utf2sz( const char * utf, char * buf );

		// multibyte character Str (mbcs) to utf8 Str
		static void mbc2utf( const char * mbc, Str & utf );

		// utf8 Str to wide Str
		static void utf2wc( const char * utf, WStr & wc );

		// wide Str to utf8 Str
		static void wc2utf( const wchar_t * wc, Str & utf );

		static void mbc2wc( const char * mbc, WStr & wc );

		static void wc2mbc( const wchar_t * wc, Str & mbc );

		static int urlEncode( const char * str, const int strSize, char * result, const int resultSize );

		static Str divideString( Str& src_str, int start_point, int max_line_length, int append_points=3);



		/** Parses a Vector3 out of a String.
		@remarks
		Format is "x y z" ie. 3 Real components, space delimited. Failure to parse returns
		Vector3::ZERO.
		*/
		static Vector3 parseVector3(const Str& val);

		static float parseReal(const String &val);
		//-----------------------------------------------------------------------
		static Quaternion parseQuaternion(const String& val);

		/** Method for splitting a fully qualified filename into the base name
		and path.
		@remarks
		Path is standardised as in standardisePath
		*/
		static     void splitFilename(const Str & qualifiedName,
			Str & outBasename, Str & outPath);

		//static const Str & toString(int val) { } 
	};

}